package com.felix.webmagic.pipeline;import com.felix.webmagic.pojo.Blog;import com.felix.webmagic.repository.BlogRepository;import org.springframework.stereotype.Component;import us.codecraft.webmagic.ResultItems;import us.codecraft.webmagic.Task;import us.codecraft.webmagic.pipeline.Pipeline;@Component("BlogRepositoryPipeline")public class BlogRepositoryPipeline implements Pipeline {    BlogRepository blogRepository;    public BlogRepositoryPipeline(BlogRepository blogRepository) {        this.blogRepository = blogRepository;    }    /**     * Process extracted results.     *     * @param resultItems resultItems     * @param task        task     */    @Override    public void process(ResultItems resultItems, Task task) {        Blog blog = resultItems.get("pojo");        blogRepository.saveAndFlush(blog);    }}